Operation void stop (), in Class Thread

Documentation

* Forces the thread to stop executing.
* <p>
* First, the <code>checkAccess</code> method of this thread is called
* with no arguments. This may result in throwing a
* <code>SecurityException</code> (in the current thread).
* <p>
* The thread represented by this thread is forced to stop whatever
* it is doing abnormally and to throw a newly created
* <code>ThreadDeath</code> object as an exception.
* <p>
* It is permitted to stop a thread that has not yet been started.
* If the thread is eventually started, it immediately terminates.
* <p>
* An application should not normally try to catch
* <code>ThreadDeath</code> unless it must do some extraordinary
* cleanup operation (note that the throwing of
* <code>ThreadDeath</code> causes <code>finally</code> clauses of
* <code>try</code> statements to be executed before the thread
* officially dies). If a <code>catch</code> clause catches a
* <code>ThreadDeath</code> object, it is important to rethrow the
* object so that the thread actually dies.
* <p>
* The top-level error handler that reacts to otherwise uncaught
* exceptions does not print out a message or otherwise notify the
* application if the uncaught exception is an instance of
* <code>ThreadDeath</code>.
*
* @exception SecurityException if the current thread cannot modify
* this thread.
* @see java.lang.Thread#checkAccess()
* @see java.lang.Thread#run()
* @see java.lang.Thread#start()
* @see java.lang.ThreadDeath
* @see java.lang.ThreadGroup#uncaughtException(java.lang.Thread, java.lang.Throwable)
* @since JDK1.0


ConcurrencySequentialExport ControlPublicAccess



Property Settings

Java
FinalTrueAbstractFalse
StaticFalseNativeFalse
SynchronizedFalse